<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //之前的函数
        //1.通过function命令声明
        function a(x, y) {
            return a + y;
        };
        //2.函数表达式声明
        let b = function(x, y) {
            return x * y;
        };
        //3.构造函数声明函数
        // let c = new Function(); //构造函数
        // 4.自调用形式
        (function(x, y) {
            console.log(x - y);
        })(10, 10);
        ! function(x, y) {
            console.log(x - y);
        }(10, 10);
        ~ function(x, y) {
            console.log(x - y);
        }(10, 10); +

        function(x, y) {
            console.log(x - y);
        }(10, 10);
    </script>
</body>

</html>